package pub.guoxin.oops.auth.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import pub.guoxin.oops.model.User;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Created by guoxin on 18-1-30.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleUserVo {

    private String id;

    @ApiModelProperty(value = "姓", required = true, hidden = true)
    private String name;

    public RoleUserVo(User user){
        this.id = user.getId();
        this.name = user.getFirstname();
    }
}
